package com.heima.search.controller;

import com.heima.common.dto.ResponseResult;
import com.heima.search.dto.ApArticleSearchDto;
import com.heima.search.service.IArticleSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @BelongsProject: heima-leadnews
 * @BelongsPackage: com.heima.search.controller
 * @Author: wangjian
 * @CreateTime: 2022-07-11  00:05
 * @Description: TODO
 * @Version: 1.0
 */

public class ArticleSearchController {
    @Autowired
    private IArticleSearchService articleSearchService;

/**
 * @description: 页面查询文章列表
 * @author: wangjian
        * @date: 2022/7/11 0:06
 * @param: dto
 * @return: ResponseResult
 **/
    @PostMapping("/search")
    public ResponseResult search(@RequestBody ApArticleSearchDto dto){
        return articleSearchService.search(dto);
    }
}
